<template>
    <div class="layout01-wrapper">
        <div class="infos">
            <div class="content">
                <h3>{{ data.title }}</h3>
                <p>{{ data.target.desc }}</p>
            </div>
            <div v-if="data.target.cover_url" class="cover">
                <img :src="data.target.cover_url" alt="cover" referrerpolicy ="never">
            </div>
        </div>
        <p class="author">by {{ data.target.author.name }}</p>
    </div>
</template>

<script>
export default {
    props: {
        data: {
            type: Object,
            default() {
                return {}
            }
        }
    }
}
</script>

<style lang="scss" scoped>
@import 'common/scss/variable.scss';
@import 'common/scss/mixins.scss';
.layout01-wrapper {
    @include border-1px;
    margin-left: 18px;
    padding: 25px 18px 25px 0;
    .infos {
        display: flex;
        .content {
            flex: 2.9;
            margin-bottom: 10px;
            h3 {
                font-size: $middle-font-size;
                line-height: 1.41;
                color: $black-font-color;
                font-weight: 500;
                margin-bottom: 6px;
            }
            p {
                display: -webkit-box;
                font-size: $small-font-size;
                line-height: 1.5;
                color: $dark-gray-font-color;
                -webkit-line-clamp: 3;
                overflow: hidden;
                text-align: justify;
                -webkit-box-orient: vertical;
            }
        }
        .cover {
            flex: 1;
            margin-left: 25px;
            img {
                width: 100%;
            }
        }
    }
    .author {
        font-size: $small-font-size;
        color: $light-gray-font-color;
    }
}
</style>

